/// @tags: SegmentTree
#include <cstdio>
#include <iostream>
#include <map>
#include <set>

using std::cin, std::cout;

namespace BlueQuantum {

constexpr int MAXN = 5e5 + 3, SEGN = 1 << 20, INF = 0x3f3f3f3f;

int n, m;
int sta[MAXN], top;
int a[MAXN], disc[MAXN], pre[MAXN];
std::map<int, int> map;
std::set<int> set[MAXN];

inline int getId(int x) {
  static int id_tot;
  std::map<int, int>::iterator iter;
  if ((iter = map.find(x)) != map.end()) return iter->second;
  if (top > 0) return map[x] = sta[top--];
  set[++id_tot].insert(0);
  return map[x] = id_tot;
}

struct Node {
  int min, max, premax;

  inline Node operator+(const Node &rhs) const {
    Node res{INF, -INF, -INF};
    res.min = std::min(min, rhs.min);
    res.max = std::max(max, rhs.max);
    res.premax = std::max(premax, rhs.premax);
    return res;
  }
} tr[SEGN];

void build(int x, int l, int r) {
  if (l == r) {
    tr[x] = Node{a[l], a[l], pre[l]};
    return;
  }
  int mid = (l + r) >> 1;
  build(x << 1, l, mid);
  build(x << 1 | 1, mid + 1, r);
  tr[x] = tr[x << 1] + tr[x << 1 | 1];
}

void update(int root, int x, Node v, int l = 1, int r = n) {
  if (l == r) {
    tr[root] = v;
    return;
  }
  int mid = (l + r) >> 1;
  x <= mid ? update(root << 1, x, v, l, mid) : update(root << 1 | 1, x, v, mid + 1, r);
  tr[root] = tr[root << 1] + tr[root << 1 | 1];
}

Node query(int x, int l, int r, int L, int R) {
  if (L <= l && r <= R) {
    return tr[x];
  }
  int mid = (l + r) >> 1;
  Node res{INF, -INF, -INF};
  if (L <= mid) res = query(x << 1, l, mid, L, R);
  if (mid < R) res = res + query(x << 1 | 1, mid + 1, r, L, R);
  return res;
}

inline int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    disc[i] = getId(a[i]);
    pre[i] = *set[disc[i]].rbegin();
    set[disc[i]].insert(i);
  }
  build(1, 1, n);
  std::set<int>::iterator it;
  for (int i = 1, opt, x, y; i <= m; ++i) {
    cin >> opt >> x >> y;
    switch (opt) {
      case 1:
        it = set[disc[x]].upper_bound(x);
        if (it != set[disc[x]].end()) {
          pre[*it] = pre[x];
          update(1, *it, Node{a[*it], a[*it], pre[*it]});
        }
        it--;
        set[disc[x]].erase(it);
        if (set[disc[x]].size() == 1) {
          map.erase(a[x]);
          sta[++top] = disc[x];
        }
        a[x] = y;
        disc[x] = getId(a[x]);
        set[disc[x]].insert(x);
        it = --set[disc[x]].find(x);
        pre[x] = *it;
        ++it, ++it;
        if (it != set[disc[x]].end()) {
          pre[*it] = x;
          update(1, *it, Node{a[*it], a[*it], pre[*it]});
        }
        update(1, x, Node{a[x], a[x], pre[x]});
        break;
      case 2:
        Node tmp = query(1, 1, n, x, y);
        cout << ((tmp.max - tmp.min + 1 == y - x + 1 && tmp.premax < x) ? "damushen\n"
                                                                        : "yuanxing\n");
    }
  }
  return 0;
}

}  // namespace BlueQuantum

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("P3792 由乃与大母神原型和偶像崇拜.in", "r", stdin);
  freopen("P3792 由乃与大母神原型和偶像崇拜.out", "w", stdout);
#endif
#endif

  std::ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  return BlueQuantum::main();
}
